package com.amigo.online.provider.user.mapper;

import java.util.List;

import com.amigo.online.common.param.dto.group.AllowApplyDto;
import com.amigo.online.provider.user.model.entity.GroupMember;
import com.amigo.online.provider.user.model.entity.GroupNotice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.amigo.online.common.core.mybatis.MyMapper;
import com.amigo.online.common.param.result.GroupInfo;
import com.amigo.online.provider.user.model.entity.Group;
import com.amigo.online.provider.user.model.entity.User;
import org.springframework.stereotype.Repository;

@Repository
public interface GroupMapper extends MyMapper<Group> {

//	List<User> getFriendsExistedInGroup(@Param("userId") Long userId, @Param("groupId")Long groupId);

    List<GroupInfo> getMyGroup(Long userId);

    int getCountByHostId(@Param("userId") Long userId,@Param("groupId") Long groupId);

    int changeGroupHost(@Param("groupId") Long groupId, @Param("secondId") Long secondId, @Param("curTime") Long curTime);

    int updateByGroupIdAndUserId(GroupMember groupMember);

    List<GroupMember> selectByGroupIdAndIsAllow(Long groupId);

    int validation(AllowApplyDto allowApplyDto);

    int isManager(GroupMember gm);

    void updateGroupNotice(GroupNotice groupNotice);
}
